import { defineStore } from 'pinia'

export const useDefaultStore = defineStore({
  id: 'default',
  state: () => ({
    count: 0,
    token: undefined
  }),
  getters: {
    getCount() {
      return this.count
    },
    getToken() {
      return this.token
    }
  },
  actions: {
    setCount(num) {
      console.log(num)
      this.count = num
    },
    setToken(token = undefined) {
      this.token = token
    }
  }
})
